Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fortawesome/fontawesome-free

Package Overview
Dependencies
Maintainers
7
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fortawesome/fontawesome-free

The iconic font, CSS, and SVG framework

  • 6.7.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
930K
decreased by-17.07%
Maintainers
7
Weekly downloads
 
Created

What is @fortawesome/fontawesome-free?

@fortawesome/fontawesome-free is a popular npm package that provides a comprehensive collection of icons and tools for integrating Font Awesome icons into web projects. It includes both free and pro icons, but the free version offers a wide range of icons suitable for most use cases.

What are @fortawesome/fontawesome-free's main functionalities?

Basic Icon Usage

This feature allows you to easily include Font Awesome icons in your HTML by using the appropriate class names. The example shows how to include a camera icon.

<i class="fas fa-camera"></i>

Icon Styling

You can style Font Awesome icons using CSS. The example demonstrates how to change the color and size of the camera icon.

<i class="fas fa-camera" style="color: red; font-size: 24px;"></i>

Using Icons with React

Font Awesome provides a React component for easier integration with React applications. The example shows how to use the FontAwesomeIcon component to include a camera icon in a React component.

import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faCamera } from '@fortawesome/free-solid-svg-icons';

function App() {
  return <FontAwesomeIcon icon={faCamera} />;
}

Using Icons with Angular

Font Awesome also provides support for Angular applications. The example shows how to set up and use Font Awesome icons in an Angular component.

import { library } from '@fortawesome/fontawesome-svg-core';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { faCamera } from '@fortawesome/free-solid-svg-icons';

library.add(faCamera);

@NgModule({
  imports: [
    FontAwesomeModule
  ]
})
export class AppModule { }

@Component({
  selector: 'app-root',
  template: '<fa-icon [icon]="'camera'"></fa-icon>'
})
export class AppComponent { }

Other packages similar to @fortawesome/fontawesome-free

Keywords

FAQs

Package last updated on 16 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc